function parseCSV(line) {
	let out = document.createElement('tr');
	let quoted = false;
	let buffer = "";
	for (let char of line) {
		if (char === "\"") {
			quoted = !quoted;
			continue;
		}
		if (!quoted) {
			if (char === ",") {
				const cell = document.createElement('td');
				cell.innerText = buffer.trim();
				out.append(cell);
				buffer = "";
			} else {
				buffer += char;
			}
		}
	}
	const lastCell = document.createElement('td');
	lastCell.innerText = buffer.trim();
	out.append(lastCell);
	return out;
}

function parseTeX(line) {
	// TODO
}
